<html>
<head>
  <title>PubSubHubbub - Configure bookmarklet</title>
  <style type="text/css">
    body {
      font-size: 18px;
      color: #000;
      background-color: #fff;
      font-family: "Trebuchet MS", Helvetica, sans-serif;
    }
    #hubUrl {
      font-size: 12px;
      width: 400px;
    }
    input {
      display: block;
      margin-bottom: 1em;
    }
  </style>
  <script type="text/javascript" charset="utf-8">
    var bookmarkletData = "(function(){if(document.body&&!document.xmlVersion){var jsonp=document.createElement('script');jsonp.type='text/javascript';jsonp.src='http://pubsubhubbub.appspot.com/bookmarklet_jsonp.min.js?rand='+Math.floor(Math.random()*1000);var head=document.getElementsByTagName('head')[0].appendChild(jsonp);};})()";
    var updateBookmarklet = function() {
      setTimeout(function() {
        var hubUrl = document.getElementById('hubUrl');
        var bookmarklet = document.getElementById('bookmarklet');
        bookmarklet.href = "javascript:" + bookmarkletData + ";(function(){window._____pshb_getHub = function() {return '" + hubUrl.value + "';};})()";
      }, 50);
    };
  </script>
  <link rel="alternate" type="application/atom+xml" href="http://example.com/this/is/my/path/to/a/long/feed/atom.xml">
</head>
<body onload="updateBookmarklet();">

<div>
  <label for="hubUrl">Publish new events to this hub:</label>
  <input type="text" name="hub" value="http://pubsubhubbub.appspot.com/" id="hubUrl" onkeypress='updateBookmarklet(); return true'>
</div>

<div>
  Drag into your Bookmarks &rarr;
  <a id="bookmarklet" href="">Publish to Hub</a>
</div>

</body>
</html>

